home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softdisk Supreme
/
Softdisk Supreme.iso
/
pc
/
DSK Files
/
0-49
/
SD001a.dsk
/
SOFTDISK.PROG.bas
< prev
next >
Wrap
BASIC Source File
|
2003-06-12
|
7KB
|
161 lines
1 REM SOFTDISK.PROG
2 GOTO 7
3 DD$ = ""
4 FOR L = 1 TO 1000: GET A$: PRINT A$;: IF A$ = CHR$(13) THEN RETURN
5 DD$ = DD$ +A$: NEXT
7 Z = 0:W = 1:DL$ = "": FOR I = W TO 37:DL$ = DL$ +"-": NEXT :I$ = CHR$(9):D$ = CHR$(4):NF$ = "SOFTDISK.TEXT"
11 RD$ = D$ +"READ " +NF$ +",R"
12 WR$ = D$ +"WRITE " +NF$ +",R"
13 BL$ = "":EL$ = "": FOR I = W TO 40:BL$ = BL$ + CHR$(160):EL$ = EL$ +"=": NEXT
15 ONERR GOTO 9000
20 PRINT D$"OPEN "NF$",L47"
30 PRINT RD$;"0"
40 INPUT RL: INPUT LV: INPUT DT$: PRINT D$: POKE 216,Z
50 IF RL = W GOTO 100
60 HOME : VTAB 12: INVERSE : PRINT "RESUME WHERE YOU LEFT OFF (Y OR N)?";: NORMAL : PRINT " ";: GET R$: PRINT D$
70 IF R$ = "Y" THEN NR = RL: GOTO 110
80 IF R$ < >"N" GOTO 60
90 RL = W: PRINT WR$;"0": PRINT RL: PRINT LV: PRINT DT$: PRINT D$: GOSUB 4000
100 NR = W
110 RN = NR
120 PRINT RD$;RN
130 INPUT RT$:NR = NR +W: IF RT$ = "D" GOTO 1030
140 INPUT PR$: INPUT VP: INPUT VR$: IF VR$ = "V" GOTO 180
150 IF VR$ = "T" OR VR$ = "Y" GOTO 170
160 MR = VAL(VR$): GOTO 190
170 MR = 2: GOTO 190
180 MR = W
190 FOR I = W TO MR: INPUT RP(I): NEXT
200 PRINT D$: IF VR$ < >"V" AND VR$ < >"1" GOTO 210
201 GOSUB 3340: IF R$ = "G" GOTO 207
202 IF R$ = "M" GOTO 205
203 IF R$ = "H" GOTO 201
204 GOSUB 3300: GOTO 201
205 IF VR$ = "V" GOTO 420
206 R$ = "1": GOTO 380
207 NR = W: GOTO 110
210 INVERSE : PRINT "Q=QUIT H=HARDCOPY V=VERBAL ";: IF VR$ = "T" GOTO 230
215 IF VR$ = "Y" GOTO 225
220 PRINT "OR 1-";MR;: GOTO 235
225 PRINT "Y OR N";: GOTO 235
230 PRINT "T OR F";
235 NORMAL : PRINT " ";: GET R$: PRINT D$
240 IF R$ = "Q" GOTO 9500
250 IF R$ < >"H" GOTO 270
260 GOSUB 3000: GOTO 210
270 IF R$ = "V" GOTO 420
280 IF VR$ = "T" GOTO 350
290 IF VR$ = "Y" GOTO 320
300 IF LEN(R$) = W AND R$ >"0" AND R$ < = VR$ GOTO 380
310 GOSUB 3300: GOTO 210
320 CP = W: IF R$ = "Y" GOTO 390
330 CP = 2: IF R$ = "N" GOTO 390
340 GOTO 310
350 CP = W: IF R$ = "T" GOTO 390
360 CP = 2: IF R$ = "F" GOTO 390
370 GOTO 310
380 CP = VAL(R$)
390 PR$ = R$: PRINT WR$;RN: PRINT RT$: PRINT PR$: PRINT VP: PRINT VR$
400 FOR I = W TO MR: PRINT RP(I): NEXT
410 PRINT D$: GOSUB 4000:NR = RP(CP): GOTO 110
420 IF VP = Z GOTO 640
430 GOSUB 3200: INVERSE : PRINT "HARDCOPY OF VERBAL RESPONSE (Y OR N)?";: NORMAL : PRINT " ";: GET R$: PRINT D$
440 IF R$ = "Y" GOTO 510
450 IF R$ = "N" GOTO 470
460 GOSUB 3320: GOTO 430
470 GOSUB 3200: INVERSE : PRINT "SKIP TO END OF RESPONSE (Y OR N)?";: NORMAL : PRINT " ";: GET R$: PRINT D$
480 IF R$ = "Y" GOTO 520
490 IF R$ = "N" GOTO 630
500 GOSUB 3320: GOTO 470
510 PS = W: PRINT D$"PR#1": PRINT I$;"40N": PRINT "******* ";DT$;" SOFTDISK FRAME ";RL
520 CV = Z
530 PV = CV:CV = VP: PRINT RD$;CV: INPUT VP: GOSUB 3:SD$ = DD$: PRINT D$: PRINT SD$
540 IF VP < >Z GOTO 530
560 IF PS < >W GOTO 710
570 PS = Z: PRINT D$"PR#0": GOTO 840
630 PV = Z:CV = VP: PRINT RD$;CV: INPUT VP: GOSUB 3:SD$ = DD$: PRINT D$: PRINT SD$: GOTO 710
640 GOSUB 3200: INVERSE : PRINT "ENTER ONE LINE AT A TIME & HIT RETURN": NORMAL :R$ = "I": GOSUB 3220: GOSUB 10000:SD$ = DD$: IF LEN(SD$) <40 GOTO 660
650 GOSUB 3330: GOSUB 3210: GOTO 640
660 LV = LV +W: ONERR GOTO 910
670 PRINT WR$;LV: PRINT VP: PRINT SD$
680 PRINT WR$;RN: PRINT RT$: PRINT PR$: PRINT LV: PRINT VR$:PV = Z
690 FOR I = W TO MR: PRINT RP(I): NEXT : PRINT D$: IF LEN(SD$) = 39 THEN GOSUB 3210
695 GOSUB 3210: PRINT SD$
700 CV = LV: PRINT WR$;"0": PRINT RL: PRINT LV: PRINT DT$: PRINT D$: GOSUB 4000: IF R$ = "I" GOTO 855
710 INVERSE : PRINT "N=NXT D=DEL C=CHNG I=INSERT G=GOBACK";: NORMAL : PRINT " ";: GET R$: PRINT D$
720 IF R$ = "D" GOTO 950
730 IF R$ = "C" GOTO 920
740 IF R$ = "I" GOTO 850
750 IF R$ = "G" GOTO 810
760 IF R$ = "N" GOTO 780
770 GOSUB 3300: GOTO 710
780 IF VP < >Z GOTO 800
790 EM$ = "THAT WAS THE LAST LINE": GOSUB 2000: GOSUB 3200: GOTO 710
800 PV = CV:CV = VP: PRINT RD$;CV: INPUT VP: GOSUB 3:SD$ = DD$: PRINT D$: GOSUB 3210: PRINT SD$: GOTO 710
810 IF VR$ < >"V" GOTO 840
820 IF RP(W) = Z GOTO 840
830 NR = RP(W): GOTO 110
840 NR = RL: GOTO 110
850 GOSUB 3210: GOSUB 3220
855 GOSUB 10000:SD$ = DD$: IF SD$ = "" THEN CL = PEEK(37): VTAB (W): CALL -868: VTAB (CL): GOTO 710
857 IF LEN(SD$) <40 GOTO 870
860 GOSUB 3330: GOTO 850
870 LV = LV +W: ONERR GOTO 910
880 PRINT WR$;LV: PRINT VP: PRINT SD$
890 PRINT RD$;CV: INPUT PP: GOSUB 3:PD$ = DD$
900 PRINT WR$;CV: PRINT LV: PRINT PD$: PRINT D$:PV = CV: GOTO 700
910 EM$ = "DISK IS FULL": GOSUB 2000:LV = LV -W: POKE 216,Z: GOTO 840
920 INPUT SD$: IF LEN(SD$) <40 GOTO 940
930 GOSUB 3330: GOSUB 3200: GOTO 920
940 PRINT WR$;CV: PRINT VP: PRINT SD$: PRINT D$: GOSUB 4000: FOR I = W TO 3: GOSUB 3200: NEXT : PRINT SD$: GOTO 710
950 IF PV = Z GOTO 990
960 PRINT RD$;PV: INPUT PP: GOSUB 3:PD$ = DD$
970 PRINT WR$;PV: PRINT VP: PRINT PD$: PRINT D$: GOSUB 4000: IF VP = Z GOTO 810
980 CV = VP: PRINT RD$;CV: INPUT VP: GOSUB 3:SD$ = DD$: PRINT D$: GOSUB 3210: GOSUB 3200: PRINT SD$: GOTO 710
990 PRINT WR$;RN: PRINT RT$: PRINT PR$: PRINT VP: PRINT VR$
1000 FOR I = W TO MR: PRINT RP(I): NEXT
1010 PRINT D$: GOSUB 4000: IF VP = Z GOTO 810
1020 CV = VP: PRINT RD$;CV: INPUT VP: GOSUB 3:SD$ = DD$: PRINT D$: GOSUB 3210: GOSUB 3200: PRINT SD$: GOTO 710
1030 INPUT BF$: INPUT AF$: GOSUB 3:SD$ = DD$: PRINT D$: IF BF$ < >"H" GOTO 1080
1070 HOME : INVERSE : PRINT "SOFTDISK MAGAZETTE ";DT$;" FRAME ";RN: NORMAL :RL = RN: PRINT WR$;"0": PRINT RL: PRINT LV: PRINT DT$: PRINT D$: GOSUB 4000
1080 PRINT SD$: IF AF$ = "N" GOTO 110
1090 IF AF$ = "D" GOTO 1170
1110 BL = VAL(AF$): FOR I = W TO BL: PRINT " ": NEXT
1120 GOTO 110
1170 PRINT DL$: GOTO 110
2000 GOSUB 3200: FLASH : PRINT EM$: NORMAL : FOR I = 1 TO 3000: NEXT : RETURN
3000 VTAB ( PEEK(37)): CALL -868: PRINT D$"PR#1": PRINT I$;"40N"
3020 PRINT EL$:PL$ = "":LC = 1879
3030 FOR K = W TO 3:LC = LC -984
3040 FOR J = W TO 8:LC = LC +128
3050 FOR I = W TO 40:AS = PEEK(LC +I): IF AS <64 THEN GOSUB 3110
3052 PL$ = PL$ + CHR$(AS): NEXT I
3060 PRINT PL$
3065 PL$ = ""
3070 NEXT J
3080 NEXT K
3090 PRINT EL$: PRINT D$"PR#0": RETURN
3110 AS = AS +128: IF AS <160 THEN AS = AS +64
3120 RETURN
3200 VTAB ( PEEK(37)): CALL -868: FOR X = 1 TO 1000: NEXT : RETURN
3210 VTAB ( PEEK(37)): CALL -868: RETURN
3220 CL = PEEK(37): VTAB (W): CALL -868: FLASH : PRINT "*";: NORMAL : PRINT " RETURN W. NO DATA STOPS INSERT MODE ";: FLASH : PRINT "*": NORMAL : VTAB (CL +W): RETURN
3300 EM$ = "INVALID RESPONSE -- ENTER AGAIN": GOSUB 2000: GOSUB 3200: RETURN
3320 EM$ = "ANSWER Y OR N": GOSUB 2000: RETURN
3330 EM$ = "ONE LINE AT A TIME PLEASE": GOSUB 2000: GOSUB 3200: RETURN
3340 INVERSE : PRINT "Q=QUIT H=HARDCOPY G=GOBACK M=MORE";: NORMAL : PRINT " ";: GET R$: PRINT D$
3341 IF R$ = "" THEN R$ = "M"
3342 IF R$ = "Q" GOTO 9500
3344 IF R$ = "H" THEN GOSUB 3000
3346 RETURN
4000 PRINT D$"CLOSE "NF$: PRINT D$"OPEN "NF$",L47": RETURN
9000 HOME : VTAB (12): INVERSE : PRINT "SOFTDISK.TEXT HAS BEEN CLOBBERED": NORMAL : PRINT D$"DELETE "NF$: END
9500 PRINT D$"CLOSE": HOME : VTAB (12): PRINT "SOFTDISK.PROG - NORMAL EOJ": END
10000 DD$ = ""
10020 GET A$: PRINT A$;: IF A$ = CHR$(13) THEN RETURN
10040 IF A$ = CHR$(8) THEN 10100
10050 IF ASC(A$) <32 THEN INVERSE : PRINT CHR$( ASC(A$) +64);: NORMAL
10060 DD$ = DD$ +A$: GOTO 10020
10100 IF LEN(DD$) = 0 THEN PRINT " ";: GOTO 10020
10115 CALL -868: IF LEN(DD$) = 1 THEN 10000
10130 DD$ = LEFT$(DD$, LEN(DD$) -1): GOTO 10020